<?php

namespace App\Models\Kms\User;

use App\Models\BaseModel;

class User extends BaseModel
{

    protected $table    = "kms_user";
    protected $fillable = [
        'name',
        'mobile',
        'status',
        'avatar',
        'createdAt',
        'createdByUid',
        'updatedAt',
        'updatedByUid',
        'isDeleted',
    ];

    public static function add(string $name, string $mobile, string $avatar)
    {
        self::query()->create(
            [
                'name'      => $name,
                'mobile'    => $mobile,
                'avatar'    => $avatar,
                'createdAt' => time(),
                'updatedAt' => time(),
            ]
        );
    }
}
